package edu.ar.bases.dvdstore.domainmodel.repositories;

import java.util.Collection;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import edu.ar.bases.dvdstore.domainmodel.entities.Evento;
import edu.ar.bases.dvdstore.domainmodel.entities.interfaces.IEvento;
import edu.ar.bases.dvdstore.domainmodel.repositories.interfaces.IEventoRepository;




public class EventoRepository extends HibernateDaoSupport implements IEventoRepository {
	
	public EventoRepository() {
		super();
	}

	
	
	public Collection<Evento> findAll()
	{
		return this.getHibernateTemplate().loadAll(Evento.class);
	}

	
	public void save(IEvento entity)
	{
		this.getHibernateTemplate().save(entity);
	}
	
	
	public IEvento findById(Integer eventoID)
	{
		return (IEvento)this.getHibernateTemplate().get(Evento.class, eventoID);
	}
}
